package com.school.hjt.schoolclasscard.utlis

import android.content.Context

/**
 * Created by xqx on 2018/1/23.
 *
 */
object PrefUtild {

    fun getString(context: Context, key: String, defValue: String): String? {
        val sp = context.getSharedPreferences("class", Context.MODE_PRIVATE)
        return sp.getString(key, defValue)
    }

    fun setString(context: Context, key: String, value: String) {
        val sp = context.getSharedPreferences("class", Context.MODE_PRIVATE)
        sp.edit().putString(key, value).commit()
    }
}